#ifndef RATE_H
#define RATE_H

#include <QDialog>
#include <QtSql>
#include <QSqlTableModel>
#include <QDataWidgetMapper>

namespace Ui {
class rate;
}

class rate : public QDialog
{
    Q_OBJECT
    
public:
    explicit rate(QWidget *parent = 0);
    ~rate();
    
private:
    Ui::rate *ui;
    QDataWidgetMapper *mapper_razgon;
    QDataWidgetMapper *mapper_probeg;
    QDataWidgetMapper *mapper_manevr;
    QDataWidgetMapper *mapper_teh;
    QSqlTableModel *model_area;
    QSqlTableModel *model_series;
    QSqlTableModel *model_station;
    QSqlTableModel *model_teh;
    QSqlRelationalTableModel *model_norm_probeg;
    QSqlRelationalTableModel *model_norm_razgon;
    QSqlRelationalTableModel *model_norm_manevr;
    QSqlRelationalTableModel *model_norm_teh;
    QSqlTableModel *model_norm_cargo;

private slots:
    void Up_Data(void);
    void Add_Probeg(void);
    void Add_Razgon(void);
    void Add_Cargo(void);
    void Add_Manevr(void);
    void Add_Teh(void);
    void Del_Cargo(void);
    void InsertFromSeries();
};

#endif // RATE_H
